#ifndef __TIMER_H__
#define __TIMER_H__
#include <SI_EFM8SB2_Register_Enums.h>
//-----------------------------------------------------------------------------
// Global Constants
//-----------------------------------------------------------------------------
typedef enum
{
    USER_TIMER_BUZZ,
    TEST_USER_TIMER,
    MAX_USER_TIMER,
}TIMER_ID_T;

typedef struct
{
    uint8_t is_used;
    uint16_t stopd_tick;
    void (*timer_cb)(void);
} USER_TIMER_T;

//-----------------------------------------------------------------------------
// Global Constants
//-----------------------------------------------------------------------------
void user_timer_init(void);
void user_timer_restart(uint8_t id,uint16_t interval,void* user_cb);
void user_timer_stop(uint8_t id);
USER_TIMER_T *get_user_timer();
#endif
